<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>12</title>
<link href="css/jquery.dataTables.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript">

var tb;
$(function(){
	tb=$("#tb_01").dataTable({
		"bFilter":false,
		"bSort":false,
		"bProcessing": true,
        "bServerSide": true,
        "ajax":{
        	"url": "data.json",
        	"type": "POST",
        	"data":function(d,b){
        		console.log(d);
        		console.log(b);
        	},
        	"dataSrc": function ( json ) {
        		console.log(json);
        	}
        },
        /* "ajax": function (data, callback, settings) {
        	console.log(data);
   		        callback(
   		          JSON.parse( localStorage.getItem('dataTablesData') )
   		        ) 
   		 }, */
   	/** "sAjaxSource": "../h1.json",
	    "fnServerParams":function(aoData){
	    	console.log("fnServerParams");
	    	//fnSearchForm();
	    },
	    "sServerMethod":"POST", */
	    "aoColumns": [
        { "mData": "engine" },
        { "mData": "browser" },
        { "mData": "platform" },
        { "mData": "version" },
        { "mData": "grade" }
    ]
	})
})
function test(){
	tb.fnSearchForm([{"name":"name","value":"sdfdsfssd"},{"name":"password","value":"123456"}]);
}
var data={"name":1234123};
function test1(){
	formSearch1(tb,data);
}
function test2(){
	tb.fnSearchForm(null);
}
</script>
</head>
<body>
<button onclick="test();">
搜索
</button>
<button onclick="test1();">
Test1
</button>
<button onclick="test2();">
重置
</button>
<table id="tb_01">
	<thead>
		<tr>姓名</tr>
		<tr>姓名</tr>
		<tr>姓名</tr>
		<tr>姓名</tr>
		<tr>姓名</tr>
	</thead>
</table>
</body>
</html>